﻿using AutoMapper;
using MyApp.DataModels;
using MyApp.DataModels.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace MyApp.WebApi.AutoMapper
{

  public class CustomAutoMapperProfile : Profile
  {
    public CustomAutoMapperProfile()
    {
            base.CreateMap<InterfaceToolEntity, InterfaceToolEntityDTO>().ForMember(a=>a.INTERFACENAME,b=>b.MapFrom(c=>c.OUTJSON));
            //base.CreateMap<BlogNews, BlogNewsDTO>()
            //  .ForMember(dest => dest.TypeName, sourse => sourse.MapFrom(src => src.TypeInfo.Name))
            //  .ForMember(dest => dest.WriterName, sourse => sourse.MapFrom(src => src.WriterInfo.Name));
        }
  }
}
